package com.hxk.tx.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.hxk.tx.mapper.UserMapper;
import com.hxk.tx.pojo.User;
import com.hxk.tx.service.UserService;

@Service
public class UserServiceImpl implements UserService{

	private UserMapper userMapper;
	
	public UserMapper getUserMapper() {
		return userMapper;
	}

	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	public int insert(User user) {
		return userMapper.insert(user);
	}

	public int delete(int userId) {
		return userMapper.delete(userId);
	}

	public int update(User user) {
		return userMapper.update(user);
	}
	
	public User selectById(int userId) {
		return userMapper.selectById(userId);
	}
	
	public List<User> selectAll() {
		return userMapper.selectAll();
	}

	public User selectByUser(User user) {
		return userMapper.selectByUser(user);
	}

	
}
